
package com.insigma.business.qrcode.welfare.dao;



import com.insigma.business.qrcode.common.annotation.Crypt;
import com.insigma.business.qrcode.soldier.entity.DataStatsCDO;
import com.insigma.business.qrcode.welfare.dto.ScanCodeRecordBSearcher;
import com.insigma.business.qrcode.welfare.entity.ScanCodeRecordDO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;


@Crypt(decryptFields = {"idCardNo", "", ""})
public interface ScanCodeRecordDao {

    
    List<ScanCodeRecordDO> search(final ScanCodeRecordBSearcher innerSearcher);

    
    ScanCodeRecordDO get(final String id);

    
    Integer insert(final ScanCodeRecordDO scanCodeRecordDO);

    
    Integer update(final ScanCodeRecordDO scanCodeRecordDO);

    
    Integer delete(@Param("id") final String id,
                   @Param("modifierType") final String modifierType,
                   @Param("modifierId") final String modifierId);

    
    List<ScanCodeRecordDO> searchMerchantScanRecord(ScanCodeRecordBSearcher searcher);

    int countMerchantCountRecord(ScanCodeRecordBSearcher searcher);

    Integer countKsme();

    Integer countCjxfScan();

    Double countKsmeMoney();

    List<DataStatsCDO> countCjxfScanAreaMap(@Param("areaLike") String areaLike, @Param("nextLevel") int nextLevel, @Param("levelLength") int levelLength);

    List<DataStatsCDO> countKsmeScanAreaMap(@Param("areaLike") String areaLike, @Param("nextLevel") int nextLevel, @Param("levelLength") int levelLength);

    int countCjxfScanBetweenTime(@Param("areaLike") String areaLike, @Param("morning") Date morning, @Param("night") Date night);

    Integer countByBizName(String name);

    int countByBizNameAndDate(@Param("name") String name, @Param("startDate") Date startDate, @Param("endDate") Date endDate);

    Integer countByAreaAndBizNameOfHospital(@Param("adminAreaCode") String adminAreaCode, @Param("bizName") String bizName);

    Integer countKsmeByArea(String adminAreaCode);

    Double countKsmeMoneyByArea(String adminAreaCode);

    List<ScanCodeRecordDO> searchMoneyNotNull(final ScanCodeRecordBSearcher innerSearcher);

    int countCjxfScanEqSoldierId(String adminAreaCode);

    int countCjxfScanEqIdCardNo(String adminAreaCode);

    List<ScanCodeRecordDO> searchHospitalRecord(ScanCodeRecordBSearcher scanCodeRecordBSearcher);

    Integer countByTypeAndBizName(@Param("type")String type, @Param("bizName")String bizName);

    Integer groupCountByTypeAndBizName(@Param("type")String type, @Param("bizName")String bizName);

    Integer countByTypeAndBizNameAndBizTime(@Param("type")String type,@Param("bizName") String bizName, @Param("bizDatetime")String bizDatetime);

    Integer countHospital();

    Integer countHospitalByBizTime(String month);

    List<DataStatsCDO> groupHospital(@Param("areaLike")String areaLike, @Param("nextLevel")int nextLevel, @Param("levelLength")int levelLength);
}
